<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <link rel="stylesheet" type="text/css" href="style.css" />
   </head>
   <body onload="if (top.frames['componentsframe'] == undefined) { s = window.location.toString(); window.location = 'index.html?p=' + s.substring(s.lastIndexOf('/')+1); }">
<h2 class="comptitle">Simple Module <i>BatteryStats</i></h2>
<b>Package:</b> org.mixim.modules.power.battery<br/><b>File: <a href="src-modules-power-battery-BatteryStats.ned.html">src/modules/power/battery/BatteryStats.ned</a></b><br/><p><a href="../doxy/a00033.html" target="mainframe"><b>C++ definition</b></a></p>

<p>module for collecting battery statistics</p>
<img src="org.mixim.modules.power.battery.BatteryStats-type.png" ismap="yes" usemap="#type-diagram"/><map name="type-diagram">
<area shape="rect" href="org.mixim.modules.power.battery.BatteryStats.html" title="BatteryStats" alt="BatteryStats" coords="0,30,108,70">
</map>
<h3 class="subtitle">Usage diagram:</h3>
<p>The following diagram shows usage relationships between types.
Unresolved types are missing from the diagram. Click <a href="full-ned-usage-diagram.html">here</a> to see the full picture.</p>
<img src="org.mixim.modules.power.battery.BatteryStats-usage.png" ismap="yes" usemap="#usage-diagram"/><map name="usage-diagram"><area shape="rect" href="org.mixim.modules.power.battery.BatteryStats.html" title="Simple Module BatteryStats" alt="BatteryStats" coords="32,88,115,112">
<area shape="rect" href="org.mixim.modules.node.WirelessNodeBattery.html" title="Compound Module WirelessNodeBattery" alt="WirelessNodeBattery" coords="7,16,140,40">
</map>
<h3 class="subtitle">Inheritance diagram:</h3>
<p>The following diagram shows inheritance relationships for this type.
Unresolved types are missing from the diagram. Click <a href="full-ned-inheritance-diagram.html">here</a> to see the full picture.</p>
<img src="org.mixim.modules.power.battery.BatteryStats-inheritance.png" ismap="yes" usemap="#inheritance-diagram"/><map name="inheritance-diagram"><area shape="rect" href="org.mixim.modules.power.battery.BatteryStats.html" title="Simple Module BatteryStats" alt="BatteryStats" coords="7,16,89,40">
</map>
<h3 class="subtitle">Used in compound modules:</h3>
<table class="typestable">
   <tr>
      <th class="name">Name</th>
      <th class="type">Type</th>
      <th class="description">Description</th>
   </tr>
<tr>
   <td>
<a href="org.mixim.modules.node.WirelessNodeBattery.html">WirelessNodeBattery</a>
   </td>
   <td>
<i>compound&nbsp;module</i>
   </td>
   <td>

<p>Standard host module for a wireless MiXiM host with configurable NIC, and OSI 
layers, and mobility module. Additional it includes a battery module plus statistics.</p>

   </td>
</tr>
</table>
<h3 class="subtitle">Parameters:</h3>
<table class="paramstable">
   <tr>
      <th class="name">Name</th>
      <th class="type">Type</th>
      <th class="defaultvalue">Default value</th>
      <th class="description">Description</th>
   </tr>
<tr class="local">
   <td>notAffectedByHostState</td>
   <td>
      <i>bool</i>
   </td>
   <td>true</td>
   <td>   </td>
</tr>
<tr class="local">
   <td>debug</td>
   <td>
      <i>bool</i>
   </td>
   <td>false</td>
   <td>
<p>write per-activity and per-device statistics to omnetpp.sca
(if false, only total energy and lifetime are written)</p>
   </td>
</tr>
<tr class="local">
   <td>detail</td>
   <td>
      <i>bool</i>
   </td>
   <td>true</td>
   <td>
<p>subscribe to battery status and record time series
data in omnetpp.vec (resolution depends on battery's 
publishDelta)</p>
   </td>
</tr>
<tr class="local">
   <td>timeSeries</td>
   <td>
      <i>bool</i>
   </td>
   <td>false</td>
   <td>   </td>
</tr>
</table>
<h3 class="subtitle">Source code:</h3>
<pre class="src"><span style="color: #808080; font-style: italic; ">//
// module for collecting battery statistics
//
</span><span style="color: #800000; font-weight: bold; ">simple</span><span style="color: #000000; "> </span><span style="color: #000000; ">BatteryStats</span><span style="color: #000000; ">
{
    </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">notAffectedByHostState</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">true</span><span style="color: #000000; ">);
        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">debug</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">false</span><span style="color: #000000; ">);
        </span><span style="color: #808080; font-style: italic; ">// write per-activity and per-device statistics to omnetpp.sca
</span><span style="color: #000000; ">		</span><span style="color: #808080; font-style: italic; ">// (if false, only total energy and lifetime are written)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">detail</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">true</span><span style="color: #000000; ">);
        </span><span style="color: #808080; font-style: italic; ">// subscribe to battery status and record time series
</span><span style="color: #000000; ">		</span><span style="color: #808080; font-style: italic; ">// data in omnetpp.vec (resolution depends on battery's 
</span><span style="color: #000000; ">		</span><span style="color: #808080; font-style: italic; ">// publishDelta)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">timeSeries</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">false</span><span style="color: #000000; ">);
}
</span></pre>
   <hr><p class="footer"><a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top"><img src="by-sa.png"></a> This documentation is released under the <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top">Creative Commons license</a></p>
   </body>
</html>
